home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 8
/
QRZ Ham Radio Callsign Database - Volume 8.iso
/
mac
/
files
/
dsp
/
dska_10.hqx
/
dska ƒ
/
dska.doc
< prev
next >
Wrap
Text File
|
1994-09-26
|
8KB
|
192 lines
DSKA - a Macintosh based TMS3202x assembler
User Interface by Eric Brombaugh (ericb@sicom.com)
version 1.0 9-26-94
Assembler by Lloyd Miller ( lloyd@lfmcal.cuc.ab.ca)
version 0.14
INTRO
This program is a simple assembler for the Texas Instruments TMS3202x family
of Digital Signal Processors. It is intended for use with the program dskL by
Gerrit Polder, which can be used to download the assembled code to the TI DSK
development system.
USAGE
The user interface is extremely simple. To assemble a source file, select your
text file in the File->Open menu. Then select File->Assemble. A console I/O
window will open indicating the progress of the assembly. If there are errors,
they will be listed in this window. Successful assembly will be noted here as
well. If you have corrected errors, you may re-assemble the source text by
choosing File->Assemble again, without first going to the File->Open menu.
The File->Preferences item allows you to customize the .xxx extension of your
resulting binary output file and listing file. The defaults are .dsk for the binary
file, and .lst for the listing file. You may also change the size (row, column) of
the console I/O window. Note that the contents of the console I/O window will
be lost if you click OK in the preferences dialog.
The file type of both of the output files is 'TEXT', so they may be viewed with
TeachText or SimpleText. The Creator of the binary file has been set to dskL,
which will allow you to load the binary file into Gerrit Polder's dskL application
simply by double-clicking on the file in the Finder.
FILES
The following files should be included with this archive:
1) DSKA The assembler application.
2) dska.doc This documentation file.
3) autotest.asm Test code for the DSK board.
4) hostspec.asm A spectrum analyzer which plots on the host computer.
5) mmregs.inc An include file which defines symbols for the TMS320c26 registers.
6) dsk_twid.inc An include file which defines sine/cosines for an fft.
7) TESTF.ASM An assembler test file.
NOTES
There are a few things about this program which could be better, command keys
would be nice for instance but were left out because they conflict with the Think C
console interface. A nice help system would be good, but doesn't really add to
the functionality.
If you have any bug-reports or problems with this application, please let me know.
Don't bother Lloyd, as he cannot support the Macintosh version.
THANKS
Thanks go to Lloyd Miller of course, for his clearly written assembler code. This
program would simply not exist without his original work. Gerrit Polder helped
immensely in the beta-test of this code, as well as providing motivation for
doing it in the first place.
LEGAL
This program is freeware. Use it, but don't sell it.
Enjoy!
Eric Brombaugh
ericb@sicom.com
emeb@indirect.com
Sept. 26, 1994
ADDITIONAL INFO
The following are docs from Lloyd Miller pertaining to his dska.c assembler. Since
the Macintosh version of dska is based on his code, I have included it here.
--------------------------------------------------------------------------
Some random notes regarding the dska.c dsp starters kit assembler
unofficial replacement I have created. This kinda assumes you have a TI
DSP Starters' kit and you have tried to use their assembler.
Features this assembler has that the standard dska.exe that comes free
with the DSK did not have:
simple arithmetic expressions (+-*/ and ()s)
nested include files
nested .if/.else/.endif
free source code
Linux compatibility (actually general portability but I haven't tested
it that much to make that claim)
second pass listing showing actual generated code offsets
Features this assembler lacks that the standard dska.exe had:
The command line option to define symbols.
To use this assembler, you will probably need to compile it yourself
since I only give out source code. You have to link with the math
library probably (-lm).
I compile it regularly on Linux with GCC and occasionally on MS-DOS
with Borland's Turbo-C 2.0.
To run the assembler the command line is:
dska source.asm binout.dsk listout.lst
The arguments are file names.
source.asm is your input file.
binout.dsk is the output binary in .dsk format just like the TI
assembler
listout.lst is the output listing file much like the TI assembler but
I think it is better
If you do not want one of the output files then use /dev/null (or NUL:
on MS-DOS).
The .dsk binary file format is pretty stupid but we have to use it to be
able to cooperate with the debugger and stuff.
You should be able to use an expression combining numbers and symbols
anywhere that you could use a number or a symbol before. The obvious
exception is the dumb expressions as labels that TI tries to call a
feature in their assembler. You can only have plain symbol names in the
label positions of lines.
The colons (":") on labels are optional. Labels and only labels start
in column one. Comments can also start in column one. Either a ";" or a
"*" in column one makes the whole line into a comment. "*" not in
column one will generally just be an error if it doen't make sense as a
multiplication. Anything else must be preceded by a space or a tab.
Labels must be separated from the operation field by a space or a tab.
The nasty restrictions they claim for the conditional assembly
expression is of course totally relaxed.
I think you could use an external macro processor such as m4 but it
would mean the line numbers wouldn't mean much any more. Perhaps someday
the assembler could recognize embeded #line operations.
One place you cannot (yet) use expressions is the floating point values
for the .qxx, .lqxx, .float, .double, .bfloat, and .efloat directives.
Ordinary labels cannot be redefined but labels on .set directives can be
redefined at will.
Forward references are generally OK in the instruction operands and
data lists but if you try hard enough you can get things confused
between the values found for pass 1 and pass 2. The assembler might
missleadingly claim you are trying to redefine labels in pass 2.
The listings show only the first two words of generated object code for
each line. Do not be concerned if you want more than two words of data
generated for a .word, .byte, .string, or one of the floating point
formats that generates more than two words. The .dsk file will be fine
even though the listing only shows the first two words. You can see the
data in the .dsk file itself or you can examine the memory with the
debugger. Perhaps I will fix this someday if I can figure out a nice
way to do it.
A lot of the error messages are repeated the same on both passes.
Error messages in the listing file will generally PRECEDE the line they
refer to.
"$ .set nnnn" is allowed but doesn't accomplish anything. The symbol
"$" is reset to the current assmbly address for every line of the
assembly. Using "$" as a label will produce lots of wierd error
messages.
I make no effort to pass judgment on the severity of conditions
detected. Error messages are not classified into warnings and fatals.
Lines skipped with .if can produce error messages while trying to
decode opcode fields looking for .endif. .else or nested .ifs. This
just means you should only use conditional assembly for actual code. To
skip over comment blocks or other lines which should never be assembled
use regular comment lines, not conditional assembly.
If you look at the structure of the assembler itself, you will find it
is pretty straight forward. Pass_1 and pass_2 contain mainly a giant
switch statement each based on the statement we are working on. There
is lots of code duplicated which might better have been in common
functions. This design resulted from seat-of-the-pants design while
coding and edit mark block and copy, not from any deep conviction that
it is right. The look up of the operation and the symbols are ultra
simple linear searching. Hashing or sorting seemed like more trouble
than they were worth. Tables have hard (but I think generous) limits
that require editing the source and recompiling to change.
Lloyd Miller
lloyd@lfmcal.cuc.ab.ca
1994 May 23 .. June 21